<?php

namespace App\Models\Order;

use App\Models\User\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;


class Info extends Model
{
    protected $table = 'jxt_order_info';

    const CREATED_AT = 'create_at';
    const UPDATED_AT = null;

    // 订单类型
    const TYPE_SUBSCRIBE = 1; //家长订阅
    const TYPE_GOLD = 2; // 都买校币
    const TYPE_VIP = 3; // 老师购买vip

    // 支付状态
    const WAIT_PAY = 1; // 待支付
    const PAID = 2; // 已支付

    public static $pay_status = [
        Info::WAIT_PAY => '待支付',
        Info::PAID => '已支付',
    ];

    public static $mobile_type = [
        '1' => 'Android',
        '2' => 'IOS',
        '3' => '小程序',
    ];

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id');
    }

}
